﻿@model Stores
@section ToolBar{
    <div class="r-c-list">
        @Html.LActionLink("新建仓库", "Edit", "Store", new { }, new { @class = "l-btn" })
    </div>
    <div class="r-c-tool">
        <a href="javascript:location.reload();" class="l-btn fa fa-refresh"></a>
        <a href="javascript:void(0);" class="l-btn fa fa-search"></a>
    </div>
}
<div class="l-m-table">
    <table>
        <tr class="bgc3">
            <th>仓库名称</th>
            <th>是否已标记地图</th>
            <th>创建时间</th>
            <th>状态</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
        @if (Model==null || Model.Items.Count <= 0) {
            <tr>
                <td colspan="6" class="t-c c0">暂无记录</td>
            </tr>
        }
        @foreach (Store c in Model.Items)
        {
            <tr>
                <td>@*@Html.LActionLink(c.StoreName, "Detail", "Store", new { id = c.StoreId })*@ @c.StoreName</td>
                <td>@(c.IsMapped ? "已标记" : "")</td>
                <td>@c.CreateTime.TimeFormat("yyyy-MM-dd")</td>
                <td>@(c.IsActive ? "启用" : "禁用")</td>
                <td>@c.Remark</td>
                <td>
                    @Html.LActionLink("修改", "Edit", "Store", new { id = c.StoreId }, new { single = "single" })
                    @Html.LAjaxPost("删除", new { id = c.StoreId, url = Url.Action("Delete", "Store"), callback = "callbackRemoveTr", tag = "delete" })
                    @Html.LAjaxPost(c.IsActive ? "禁用" : "启用", new { id = c.StoreId, isActive = !c.IsActive, url = Url.Action("Active", "Store") })
                </td>
            </tr>
        }
    </table>
</div>
@section Pager{
    @Html.Pager("Index", "Store", Model.TotalCount, (int)ViewBag.PageIndex, 20)
}